package com.sea.operate.service;


import com.sea.operate.entity.RelatedSku;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;
import java.util.List;

/**
 * @author 陈鸿飞
 */
public interface RelatedSkuService {
    /**
     * 查询指定
     * @param relatedSku
     * @return
     */
    List<RelatedSku> findByCnd(RelatedSku relatedSku);

    /**
     * 新增
     * @param relatedSku
     * @return
     */
    int save(RelatedSku relatedSku);
    /**
     * 导入SKU
     * @param inputStream
     * @param fileName
     * @return
     * @throws Exception
     */
    void importRelated(InputStream inputStream, String fileName) throws Exception;
    /**
     * 根据
     * @param relatedChannelName
     * @param relatedSku
     * @return
     */
    RelatedSku findByChannelSku(String relatedChannelName,String relatedSku);
    /**
     * 查询指定
     * @param id
     * @return
     */
    RelatedSku findById(Integer id);
    /**
     * 修改SKU
     * @param relatedSku
     * @return
     */
    int usave(RelatedSku relatedSku);

    /**
     * 根据渠道SKU返回对照表信息
     * @param relatedSku
     * @return
     */
    RelatedSku findByChannelSku(RelatedSku relatedSku);
    /**
     * 查询唯一
     * @param relatedSku
     * @return
     */
    RelatedSku findByUnique(RelatedSku relatedSku);
    /**
     * 更新Listing名称
     * @return
     */
    Integer updateListingName();
    /**
     * 导入产品标
     * @param inputStream
     * @param fileName
     * @return
     * @throws Exception
     */
    void importRelatedFlag(MultipartFile file, String fileName) throws Exception;
    /**
     * 根据FNSKU更新商品标
     * @param relatedSku
     * @return
     */
    Integer updateRelatedFile(RelatedSku relatedSku);

    List<RelatedSku> findByProduceId(Integer produceId);

    List<RelatedSku> findRelatedFileByProduceId(Integer produceId);

    String decodeBarCode(InputStream inputStream, String sku) throws Exception;

}
